#include "ControladorMouse.h"


ControladorMouse::ControladorMouse(Escena* escena) {
	this->escena = escena;
	this->lastX = 0;
	this->lastY = 0;
}

void ControladorMouse::onButtonClick(int button, int state, int x, int y) {
	switch(state)
	{
	case GLUT_DOWN:
		this->lastX = x;
		this->lastY = y;
		break;
	case GLUT_UP:
		this->moverCamara(x - this->lastX, y - this->lastY);
		break;
	default:
		break;
	}
}

ControladorMouse::~ControladorMouse(void)
{
}
